<!--
 * @Author: AHANG
 * @Date: 2022-07-23 10:13:27
 * @LastEditors: AHANG
 * @LastEditTime: 2022-07-23 10:13:27
 * @Description: 
-->
<template>
  <v-container class="container">
    <v-tooltip top>
      <template v-slot:activator="{ on, attrs }">
        <v-btn @click="RefreshData" v-bind="attrs" v-on="on" tile>
          <v-icon>mdi-account-multiple</v-icon>
        </v-btn>
      </template>
      <span>刷新数据</span>
    </v-tooltip>
    <!-- <v-card tile class="pa-2"> </v-card> -->
    <studentInfo></studentInfo>
    <!-- snackbar -->
    <v-snackbar v-model="snackbar" top> {{ text }} </v-snackbar>
  </v-container>
</template>

<script>
import studentInfo from "../components/studentInfo.vue";
export default {
  components: { studentInfo },
  name: "Account",
  data: () => ({
    text: "",
    snackbar: false,
  }),
  methods: {
    RefreshData() {
      this.$store
        .dispatch("user/GET_studentsInfo")
        .then(() => {
          this.text = "刷新成功";
        })
        .catch(() => {
          this.text = "刷新失败";
        });
      this.snackbar = true;
    },
  },
};
</script>

<style scoped>
.container {
  max-width: none;
}
</style>
